package com.adingxiong.quickstart.project.entity.vo;

import com.adingxiong.quickstart.project.entity.GoodsContent;
import com.adingxiong.quickstart.project.entity.GoodsInfo;
import com.adingxiong.quickstart.project.entity.Kpi;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName GoodsDetailVo
 * @Description TODO
 * @Author xiongchao
 * @Date 2020/6/2 14:02
 **/
@Data
public class GoodsDetailVo implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品介绍标题")
    private String title;

    @ApiModelProperty(value = "首页商品简介")
    private String homeKeywords;

    @ApiModelProperty(value = "首页商品图片")
    private String homeGodsimg;

    @ApiModelProperty(value = "详细介绍")
    private String content;

    @ApiModelProperty(value = "kpi属性")
    private Kpi kpi;

    @ApiModelProperty(value = "商品详情")
    private List<GoodsContent> goodsContent;

    public GoodsDetailVo (GoodsInfo goodsInfo){
        BeanUtils.copyProperties(goodsInfo,this);
    }


}
